package string;

public class StartsWithDemo {
    public static void main(String[] args) {
        String str = "thinking in java";
        boolean starts = str.startsWith("think");//判断当前字符串是否是以给定的字符串开始的？
        System.out.println(starts);
        boolean ends = str.endsWith(".png");//判断当前字符串是否是以给定的字符串结尾的？
        System.out.println(ends);


    }
}
